<template>
  <a-image :width="200" :src="imgSrc" v-if="imgSrc" />
</template>
<script lang="ts" setup>
  import { ref, watch } from 'vue';

  const props = defineProps({
    defaultValue: String,
  });
  const imgSrc = ref(props.defaultValue);
  const emit = defineEmits(['update:value']);
  watch(imgSrc, (val) => {
    emit('update:value', val);
  });
</script>
